/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/



#if !defined(AFX_PGLALLPROPSDLG_H__31979510_637D_41F4_8DCA_B019499F021A__INCLUDED_)
#define AFX_PGLALLPROPSDLG_H__31979510_637D_41F4_8DCA_B019499F021A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <pgl/core/PGLRegion.h>
#include <pgl/core/PGLDef.h>
#include <pgl/core/PGLCoreGlobal.h>

/*! \brief A property explorer for objects in the graph.
 
   \ingroup PGLDialogGroup

\image html allprops.png "Property explorer"
\image latex allprops.eps "Property explorer"

  This dialog is shown when the user right clicks on an object. The object hierarchy is loaded in
a tree and the property sheets of the selected object is loaded dynamically to the dialog box.

\sa CPGLObject::AddPropTree
\sa CPGLObject::AddPropertyPage
*/
class PGLCORE_EXT_CLASS CPGLAllPropsDlg : public CDialog
{
// Construction
public:
	CPGLAllPropsDlg(CWnd* pParent = NULL, CPGLRegionStPtr _pRegion = CPGLRegionStPtr());   // standard constructor

	void SetRegion(CPGLRegionStPtr _pRegion)	{	m_pRegion=_pRegion;};
	void SetSelection(long _lSelID)				{	m_lSelID=_lSelID;};
	void SetSelection(CPGLObjectPtr pObj)		{	m_lSelID=pObj->GetID();};
// Dialog Data
	//{{AFX_DATA(CPGLAllPropsDlg)
	enum { IDD = IDD_PGL_ALL_PROPS_DIALOG };
	CTreeCtrl	m_tree;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPGLAllPropsDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	CImageList m_imgList;
	long m_lSelID;
	CBitmap m_bmpSelect;
	void FillTree();
	CPropertySheet* m_pSheet;
	CPGLRegionStPtr m_pRegion;
private:

	// Generated message map functions
	//{{AFX_MSG(CPGLAllPropsDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnDestroy();
	afx_msg void OnSelchangedPglObjecttree(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnPglButtonClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PGLALLPROPSDLG_H__31979510_637D_41F4_8DCA_B019499F021A__INCLUDED_)
